function [7:0] aes_mult_02;
  input [7:0] data_in;
  begin
    aes_mult_02 = (data_in << 1) ^ {8{data_in[7]}} & 8'h1b;
  end
endfunction

function [7:0] aes_mult_04;
  input [7:0] data_in;
  begin
    aes_mult_04 = ((data_in << 2) ^ {8{data_in[6]}} & 8'h1b) ^ {8{data_in[7]}} & 8'h36;
  end
endfunction

function [7:0] mix_col_pol;
  input [7:0] in1, in2, in3;
  begin
    mix_col_pol = aes_mult_02(in1) ^ in2 ^ in3; 
  end
endfunction
